var jsdebug=function(v){
		var t = typeof v;
		var r = '';
		switch(t){
			case 'number': 
				r += " number { " + v + "}";
				break;
			case 'string' : 	
				r += " string ("+v.length+") { "+v+"} ";break;
			case 'boolean' : 	
				r += " boolean   { "+v+"} ";break;
			case 'object' : 
				r += " object { "+so(v)+"} ";	break;
			case 'function' : 	
				r += " function { "+v+"} ";	break;
			case 'undefined' :	
				r += "undefined {} ";break;
			default :
				r += t + "{ "+so(v)+"}";	
		}
		return r;
		
		function so(v){
		var r = '';
		for(var x in v){
			try{r += x + " => " + v[x] + '\n';}catch(e){}
		}
		return r;
	}
	
}